package Lesson17Homework;

public class Employee extends Person
{
	double daySalary;
	
	Employee(String name, int age, boolean isMale, double daySalary) 
	{
		super(name, age, isMale);
		this.daySalary = daySalary;
	}
	
		@Override
		void calculateOvertime (int overtime)
		{
			System.out.println(this.name);
			if(super.age < 18)
			{
				//return 0;
				System.out.println("Under 18!");
			}
			else
			{
			System.out.println(	overtime * ((this.daySalary / 8) * 1.5));     
			}
			
		}
		
		
		@Override
		void showInfo ()
		{
			System.out.println("==== Employee Info ====");
			System.out.println("Name: " + this.name);
			System.out.println("Age: " + this.age);
			System.out.println("Is male!? " + this.isMale);			
			System.out.println("Day salary: " + this.daySalary);
		}
	
}
